\(\int \frac {1}{\sqrt {x} (a+b \text {sech}(c+d \sqrt {x}))} \, dx\) [64]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F(-2)]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 68 \[ \int \frac {1}{\sqrt {x} \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )} \, dx=\frac {2 \sqrt {x}}{a}-\frac {4 b \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b} d} \]

[Out]

-4*b*arctan((a-b)^(1/2)*tanh(1/2*c+1/2*d*x^(1/2))/(a+b)^(1/2))/a/d/(a-b)^(1/2)/(a+b)^(1/2)+2*x^(1/2)/a

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {5544, 3868, 2738, 214} \[ \int \frac {1}{\sqrt {x} \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )} \, dx=\frac {2 \sqrt {x}}{a}-\frac {4 b \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )}{\sqrt {a+b}}\right )}{a d \sqrt {a-b} \sqrt {a+b}} \]

[In]

Int[1/(Sqrt[x]*(a + b*Sech[c + d*Sqrt[x]])),x]

[Out]

(2*Sqrt[x])/a - (4*b*ArcTan[(Sqrt[a - b]*Tanh[(c + d*Sqrt[x])/2])/Sqrt[a + b]])/(a*Sqrt[a - b]*Sqrt[a + b]*d)

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 2738

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[2*(e/d), Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rule 3868

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(-1), x_Symbol] :> Simp[x/a, x] - Dist[1/a, Int[1/(1 + (a/b)*Sin[c
+ d*x]), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]

Rule 5544

Int[(x_)^(m_.)*((a_.) + (b_.)*Sech[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simpli
fy[(m + 1)/n] - 1)*(a + b*Sech[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplif
y[(m + 1)/n], 0] && IntegerQ[p]

Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int \frac {1}{a+b \text {sech}(c+d x)} \, dx,x,\sqrt {x}\right ) \\ & = \frac {2 \sqrt {x}}{a}-\frac {2 \text {Subst}\left (\int \frac {1}{1+\frac {a \cosh (c+d x)}{b}} \, dx,x,\sqrt {x}\right )}{a} \\ & = \frac {2 \sqrt {x}}{a}+\frac {(4 i) \text {Subst}\left (\int \frac {1}{1+\frac {a}{b}+\left (1-\frac {a}{b}\right ) x^2} \, dx,x,i \tanh \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )\right )}{a d} \\ & = \frac {2 \sqrt {x}}{a}-\frac {4 b \arctan \left (\frac {\sqrt {a-b} \tanh \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b} d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.19 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.01 \[ \int \frac {1}{\sqrt {x} \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )} \, dx=\frac {2 \left (\frac {c}{d}+\sqrt {x}+\frac {2 b \arctan \left (\frac {(-a+b) \tanh \left (\frac {1}{2} \left (c+d \sqrt {x}\right )\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} d}\right )}{a} \]

[In]

Integrate[1/(Sqrt[x]*(a + b*Sech[c + d*Sqrt[x]])),x]

[Out]

(2*(c/d + Sqrt[x] + (2*b*ArcTan[((-a + b)*Tanh[(c + d*Sqrt[x])/2])/Sqrt[a^2 - b^2]])/(Sqrt[a^2 - b^2]*d)))/a

Maple [A] (verified)

Time = 0.27 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.32

method result size
derivativedivides \(\frac {-\frac {2 \ln \left (\tanh \left (\frac {c}{2}+\frac {d \sqrt {x}}{2}\right )-1\right )}{a}+\frac {2 \ln \left (\tanh \left (\frac {c}{2}+\frac {d \sqrt {x}}{2}\right )+1\right )}{a}-\frac {4 b \arctan \left (\frac {\left (a -b \right ) \tanh \left (\frac {c}{2}+\frac {d \sqrt {x}}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a \sqrt {\left (a +b \right ) \left (a -b \right )}}}{d}\) \(90\)
default \(\frac {-\frac {2 \ln \left (\tanh \left (\frac {c}{2}+\frac {d \sqrt {x}}{2}\right )-1\right )}{a}+\frac {2 \ln \left (\tanh \left (\frac {c}{2}+\frac {d \sqrt {x}}{2}\right )+1\right )}{a}-\frac {4 b \arctan \left (\frac {\left (a -b \right ) \tanh \left (\frac {c}{2}+\frac {d \sqrt {x}}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{a \sqrt {\left (a +b \right ) \left (a -b \right )}}}{d}\) \(90\)

[In]

int(1/(a+b*sech(c+d*x^(1/2)))/x^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/d*(-1/a*ln(tanh(1/2*c+1/2*d*x^(1/2))-1)+1/a*ln(tanh(1/2*c+1/2*d*x^(1/2))+1)-2*b/a/((a+b)*(a-b))^(1/2)*arctan
((a-b)*tanh(1/2*c+1/2*d*x^(1/2))/((a+b)*(a-b))^(1/2)))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 116 vs. \(2 (55) = 110\).

Time = 0.30 (sec) , antiderivative size = 254, normalized size of antiderivative = 3.74 \[ \int \frac {1}{\sqrt {x} \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )} \, dx=\left [\frac {2 \, {\left ({\left (a^{2} - b^{2}\right )} d \sqrt {x} - \sqrt {-a^{2} + b^{2}} b \log \left (\frac {a b + {\left (b^{2} + \sqrt {-a^{2} + b^{2}} b\right )} \cosh \left (d \sqrt {x} + c\right ) + {\left (a^{2} - b^{2} - \sqrt {-a^{2} + b^{2}} b\right )} \sinh \left (d \sqrt {x} + c\right ) + \sqrt {-a^{2} + b^{2}} a}{a \cosh \left (d \sqrt {x} + c\right ) + b}\right )\right )}}{{\left (a^{3} - a b^{2}\right )} d}, \frac {2 \, {\left ({\left (a^{2} - b^{2}\right )} d \sqrt {x} + 2 \, \sqrt {a^{2} - b^{2}} b \arctan \left (-\frac {\sqrt {a^{2} - b^{2}} a \cosh \left (d \sqrt {x} + c\right ) + \sqrt {a^{2} - b^{2}} a \sinh \left (d \sqrt {x} + c\right ) + \sqrt {a^{2} - b^{2}} b}{a^{2} - b^{2}}\right )\right )}}{{\left (a^{3} - a b^{2}\right )} d}\right ] \]

[In]

integrate(1/(a+b*sech(c+d*x^(1/2)))/x^(1/2),x, algorithm="fricas")

[Out]

[2*((a^2 - b^2)*d*sqrt(x) - sqrt(-a^2 + b^2)*b*log((a*b + (b^2 + sqrt(-a^2 + b^2)*b)*cosh(d*sqrt(x) + c) + (a^
2 - b^2 - sqrt(-a^2 + b^2)*b)*sinh(d*sqrt(x) + c) + sqrt(-a^2 + b^2)*a)/(a*cosh(d*sqrt(x) + c) + b)))/((a^3 -
a*b^2)*d), 2*((a^2 - b^2)*d*sqrt(x) + 2*sqrt(a^2 - b^2)*b*arctan(-(sqrt(a^2 - b^2)*a*cosh(d*sqrt(x) + c) + sqr
t(a^2 - b^2)*a*sinh(d*sqrt(x) + c) + sqrt(a^2 - b^2)*b)/(a^2 - b^2)))/((a^3 - a*b^2)*d)]

Sympy [F]

\[ \int \frac {1}{\sqrt {x} \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )} \, dx=\int \frac {1}{\sqrt {x} \left (a + b \operatorname {sech}{\left (c + d \sqrt {x} \right )}\right )}\, dx \]

[In]

integrate(1/(a+b*sech(c+d*x**(1/2)))/x**(1/2),x)

[Out]

Integral(1/(sqrt(x)*(a + b*sech(c + d*sqrt(x)))), x)

Maxima [F(-2)]

Exception generated. \[ \int \frac {1}{\sqrt {x} \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate(1/(a+b*sech(c+d*x^(1/2)))/x^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
 for more de

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.90 \[ \int \frac {1}{\sqrt {x} \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )} \, dx=-\frac {4 \, b \arctan \left (\frac {a e^{\left (d \sqrt {x} + c\right )} + b}{\sqrt {a^{2} - b^{2}}}\right )}{\sqrt {a^{2} - b^{2}} a d} + \frac {2 \, {\left (d \sqrt {x} + c\right )}}{a d} \]

[In]

integrate(1/(a+b*sech(c+d*x^(1/2)))/x^(1/2),x, algorithm="giac")

[Out]

-4*b*arctan((a*e^(d*sqrt(x) + c) + b)/sqrt(a^2 - b^2))/(sqrt(a^2 - b^2)*a*d) + 2*(d*sqrt(x) + c)/(a*d)

Mupad [B] (verification not implemented)

Time = 2.56 (sec) , antiderivative size = 155, normalized size of antiderivative = 2.28 \[ \int \frac {1}{\sqrt {x} \left (a+b \text {sech}\left (c+d \sqrt {x}\right )\right )} \, dx=\frac {2\,\sqrt {x}}{a}+\frac {2\,b\,\ln \left (\frac {2\,b\,{\mathrm {e}}^{d\,\sqrt {x}}\,{\mathrm {e}}^c}{a^2\,\sqrt {x}}-\frac {2\,b\,\left (a+b\,{\mathrm {e}}^{d\,\sqrt {x}}\,{\mathrm {e}}^c\right )}{a^2\,\sqrt {x}\,\sqrt {a+b}\,\sqrt {b-a}}\right )}{a\,d\,\sqrt {a+b}\,\sqrt {b-a}}-\frac {2\,b\,\ln \left (\frac {2\,b\,{\mathrm {e}}^{d\,\sqrt {x}}\,{\mathrm {e}}^c}{a^2\,\sqrt {x}}+\frac {2\,b\,\left (a+b\,{\mathrm {e}}^{d\,\sqrt {x}}\,{\mathrm {e}}^c\right )}{a^2\,\sqrt {x}\,\sqrt {a+b}\,\sqrt {b-a}}\right )}{a\,d\,\sqrt {a+b}\,\sqrt {b-a}} \]

[In]

int(1/(x^(1/2)*(a + b/cosh(c + d*x^(1/2)))),x)

[Out]

(2*x^(1/2))/a + (2*b*log((2*b*exp(d*x^(1/2))*exp(c))/(a^2*x^(1/2)) - (2*b*(a + b*exp(d*x^(1/2))*exp(c)))/(a^2*
x^(1/2)*(a + b)^(1/2)*(b - a)^(1/2))))/(a*d*(a + b)^(1/2)*(b - a)^(1/2)) - (2*b*log((2*b*exp(d*x^(1/2))*exp(c)
)/(a^2*x^(1/2)) + (2*b*(a + b*exp(d*x^(1/2))*exp(c)))/(a^2*x^(1/2)*(a + b)^(1/2)*(b - a)^(1/2))))/(a*d*(a + b)
^(1/2)*(b - a)^(1/2))